#pragma once
#include <d3d9.h>
#include <D3D10.h>
#include <string>
#include "mtypes.h"

union UD3DDevice
{
    ID3D10Device     *pD3D10Device;
    IDirect3DDevice9 *pD3D9Device;
};

/* Types of variables */
enum TVariableType
{
    TFLOAT = 0,
    TFLOAT2,
    TFLOAT3,
    TFLOAT4,
    TUINT32,
    TUINT16,
    TINT32,

    TLAST
};

/* Type Sizes */
static mUInt g_uVarTypeSize[] = 
{
    4,
    8,
    12,
    16,
    4,
    2,
    4
};

enum TImageFormat
{
    TR8 = 0,
    TR8G8B8A8,

    TR32F,
    TR32G32B32A32F,    
};

enum TPrimitiveType
{
    TUNDEFINED = -1,
    TPOINTLIST,
    TLINELIST,
    TLINESTRIP,
    TTRIANGLELIST,
    TTRIANGLESTRIP,
    /* Adj. types. In dx9 is the same as list (i.e. TLINELIST_ADJ == TLINELIST) */
    TPOINTLIST_ADJ,
    TLINELIST_ADJ,
    TLINESTRIP_ADJ,
    TTRIANGLELIST_ADJ,
    TTRIANGLESTRIP_ADJ
};

static std::string g_sSemantics[] = 
{
    "POSITION",
    "TEXCOORD",
    "BINORMAL",
    "TANGENT",
    "NORMAL",
    "BLENDWEIGHT",
    "BLENDINDICES"
};

enum TChangeFreq
{
    Immutable = 0,
    Rarely,
    UserControlled,
    EveryFrame,

    ChangeFreqLast
};

static std::string g_sChangeFreqNames[ChangeFreqLast] = 
{
    "Immutable",
    "Rarely",
    "UserControlled",
    "EveryFrame"
};